<include file="public@header"/>

</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>共享文件</a></li>
        <li><a href="{:url('Files/uploads',array('eid'=> $eid))}">上传文件</a></li>
    </ul>




    <form method="post" class="js-ajax-form margin-top-20">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>创建时间</th>
                <th>创建人</th>
                <th>文件名称</th>
                <th>下载</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="res" id="v">
                <tr>
                    <td>{$v.createTime}</td>
                    <td>{$v.userName}</td>
                    <td>{$v.fileName}</td>
                    <td>
                        <a class="btn btn-xs btn-success "
                           href="{:url('Files/down',array('id'=> $v['id']))}">下载</a>
                        <?php
                            if(cmf_get_current_admin_id() == $v['userid']){
                        ?>
                        <a class="btn btn-xs btn-danger js-ajax-delete "
                           href="{:url('Files/del',array('id'=> $v['id']))}">删除</a>
                        <?php
                        if($v['isuse'] != 1){
                            ?>
                        <a class="btn btn-xs btn-danger "
                           href="{:url('Files/open',array('id'=> $v['id']))}">开放下载</a>
                        <?php
                        }else{
                            ?>
                        <a class="btn btn-xs btn-danger "
                           href="{:url('Files/open',array('id'=> $v['id']))}">关闭下载</a>
                        <?php
                            }
                        ?>
                        <?php
                        }
                        ?>
                    </td>
                </tr>
            </foreach>

            </tbody>
        </table>

    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>